from flask import current_app, send_from_directory
from flask_restful import Resource


class Download(Resource):
    def get(self, setname, filename):
        config = current_app.upload_set_config.get(setname)
        print(f"config{config.destination}")
        return send_from_directory(config.destination, filename)
